import Vuex from 'vuex';
import Vue from 'vue';
Vue.use(Vuex);
export const store = new Vuex.Store({
  state:{
    num:1,
    baner:[],
    userLove:'',
    oldPlay:'',
    userDtai:'',
    userGzhu:'',
    userGzhuList:'',
    userFsi:'',
    userXqing:'',
    userDongtai:'',
    foucsDongtai:'',
    viedeoGroup:'',
    videoId:'',
    videoUrl:'',
    coverUrl:'',
    title:'',
    praisedCount:'',
    shareCount:'',
    avatarUrl:'',
    nikName:'',
    userEvent:'',
    userEventId:'',
    Uevent:'',
    foucsUserXqing:'',
    musicUrl:'',
    musciGeci:'',
    musciTimer:'',
    sixin:'',
    sixinTwo:'',
    tz:''
  },//相当于data
  getters:{
    // reverseB(state){
    //   return state.b.split('').reverse().join('');
    // }
  },//computed
  mutations:{
    addA(state,n){
      state.videoId+=n;
    },
    getBaner(state,data){
      state.baner=data;
    },
    getUserLove(state,data){
      state.userLove=data;
      },

   getOldPlay(state,data){
      state.oldPlay=data;
    },
    getUserDtai(state,data){
      state.userDtai=data;
    },
    getUserGzhu(state,data){
      state.userGzhu=data;
      },
    getUserXqing(state,data){
      state.userXqing=data;
    },
    getFoucsUserXqing(state,data){
      state.foucsUserXqing=data;
    },
    getUserGzhuList(state,data){
      state.userGzhuList=data;

    },
    getUserFsi(state,data){
      state.userFsi=data;
    },
    getUserDongtai(state,data){
      state.userDongtai=data;
    },
    getFoucsUserDongtai(state,data){
      state.foucsDongtai=data;
      },
    getVideoGroup(state,data){
      state.viedeoGroup=data;

    },
    getVideoId(state,data){
      state.videoId=data;
      },
    getVideoUrl(state,data){
      state.videoUrl=data;

    },
    getCoverUrl(state,data){
      state.coverUrl=data;

    },
    getTitle(state,data){
      state.title=data;
    },
    getPraisedCount(state,data){
      state.praisedCount=data;
    },
    getShareCount(state,data){
      state.shareCount=data;
    },
    getAvatarUrl(state,data){
      state.avatarUrl=data;
    },
    getNikName(state,data){
      state.nikName=data;
    },
    getUserEvent(state,data){
      state.userEvent=data;
    },
    getUserEventId(state,data){
      state.userEventId=data;
    },
    getUevent(state,data){
      state.Uevent=data;
    },
    getMusicUrl(state,data){
      state.musicUrl=data;
    },
    getMusciGeci(state,data){
      state.musciGeci=data;
    },
    getMusciTimer(state,data){
      state.musciTimer=data;
    },
    getSiXin(state,data){
      state.sixin=data;
    },
    getSiTwo(state,data){
      state.sixinTwo=data;
    },
    getTz(state,data){
      state.tz=data;
    },
    _delA(state){
      state.a--;
    }
  },//methosd
  actions:{
    delA(store){
      setTimeout(function () {
        store.commit('_delA')
      },5000)
    }
  },//methods
});
